package com.gitee.hljdrl.ffkit.app;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;


public abstract class FFKitActivity extends AppCompatActivity {


    protected final String TAG = getClass().getSimpleName();

    public Activity getActivity() {
        return this;

    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        onCreateStart();
        super.onCreate(savedInstanceState);
        onCreateFront();
        View rootView = getBindingView();
        if (rootView != null) {
            setContentView(rootView);
        }
        onCreateFacingBack();
        initView();
        initData();
        initListener();
    }

    /**
     * 前置
     */
    public void onCreateFront() {

    }

    public void onCreateStart() {

    }

    /**
     * 后置
     */
    public void onCreateFacingBack() {

    }

    public abstract View getBindingView();

    public abstract void initView();

    public abstract void initData();

    public abstract void initListener();


}
